Skip to content

Remove Python3 and some dependencies#41120

Merged
vbraun merged 44 commits intosagemath:developfrom
cxzhong:Bump-Python
Apr 8, 2026
Merged

Remove Python3 and some dependencies#41120
vbraun merged 44 commits intosagemath:developfrom
cxzhong:Bump-Python

Conversation

@cxzhong
Copy link
Copy Markdown
Contributor

@cxzhong cxzhong commented Oct 31, 2025

  1. Delete python3 and sqlite packages. as @dimpase suggested, we do not provide python3 package.
  2. fix the ncurses compilation problem. It is caused by The C++ part is not maintained and it is unused for mostly all cases. So we directly do not compile the C++ part.
  3. fix the readline package can not be built in gcc15. remove the outdate patch.
  4. building sage in high parallel threads may result error. When the sagelib started building, the maxima is still building. It will cause sagelib can not proper find the location of maxima. Just add maxima as a dependency of sagelib.
  5. fix the CI, because we remove python package.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

…es, openssl, python3, readline, sqlite, and xz
@cxzhong cxzhong marked this pull request as ready for review October 31, 2025 08:39
@cxzhong cxzhong requested a review from dimpase October 31, 2025 08:40
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 31, 2025

Documentation preview for this PR (built with commit e3cd73e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@cxzhong cxzhong closed this Nov 24, 2025
@cxzhong cxzhong deleted the Bump-Python branch November 24, 2025 12:39
@cxzhong cxzhong restored the Bump-Python branch February 2, 2026 14:18
@cxzhong cxzhong reopened this Feb 2, 2026
@orlitzky
Copy link
Copy Markdown
Contributor

orlitzky commented Feb 2, 2026

I am officially retiring from supporting the things in build/pkgs, sorry :)

The changes look OK to me, only the --no-as-needed is a bit suspicious because --as-needed is default on Gentoo and we don't have any workarounds for it in readline.

@dimpase
Copy link
Copy Markdown
Member

dimpase commented Feb 2, 2026

the best way here is to remove Python package from the distro. It has about 1 user, who easily can do without it, too.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Feb 3, 2026

the best way here is to remove Python package from the distro. It has about 1 user, who easily can do without it, too.

It will break minimal linux CI. for minimal building, it needs python package. How to deal with this problem. and we can not test the building of such basic packages like readline ncurses and so on

@cxzhong cxzhong changed the title Upgrade Python3 and dependencies regularly Delete Python3 and sqlite Feb 3, 2026
Since Sage now requires system Python 3.12+, remove:
- ubuntu-jammy (Python 3.10)
- debian-bullseye (Python 3.9)
- debian-bookworm (Python 3.11)
- centos-stream-9 (Python 3.9)

Keep only:
- ubuntu-noble (Python 3.12)
- fedora-40 (Python 3.12)
- fedora-41 (Python 3.12/3.13)
- opensuse-tumbleweed (rolling, has Python 3.12+)
Since Python 3.12 removed distutils from the standard library, setuptools
is now required for the configure-time extension compilation tests.

- debian.txt: Add python3-setuptools and python3-venv
- opensuse.txt: Add python3-setuptools
- fedora.txt: Add python3-setuptools
The configure-time extension compilation tests need Python.h header.

- debian.txt: Add python3-dev
- opensuse.txt: Add python3-devel
- fedora.txt: Add python3-devel
CentOS Stream 10 has Python 3.12+ available, so it's compatible with
the new system Python requirement.

- docker.yml: Add centos-stream-10 to tox_system_factors
- tox.ini: Add centos-stream-10 with BASE_TAG=stream10

CentOS uses SYSTEM=fedora, so fedora.txt prereqs apply which already
have python3-devel and python3-setuptools.
@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 23, 2026

This seems a race condition

  [pari_galdata-20080411.p0] error installing, exit status 1. Log file:
  [pari_galdata-20080411.p0]   Attempting to download package pari_galdata-20080411.tar.bz2 from mirrors
  [pari_galdata-20080411.p0]   https://github.com/sagemath/sage/releases/download/10.9/pari_galdata-20080411.tar.bz2
  [pari_galdata-20080411.p0]   [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
  [pari_galdata-20080411.p0]   ERROR [transfer|run:137]: HTTP Error 404: Not Found
  [pari_galdata-20080411.p0]   https://github.com/sagemath/sage/releases/download/10.8/pari_galdata-20080411.tar.bz2
  [pari_galdata-20080411.p0]   [......................................................................]
  [pari_galdata-20080411.p0]   Setting up build directory /sage/local/var/tmp/sage/build/pari_galdata-20080411.p0
  [pari_galdata-20080411.p0]   No patch files found in ../patches
  [pari_galdata-20080411.p0]   Host system: Linux buildkitsandbox 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec  1 20:10:50 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
  [pari_galdata-20080411.p0]   C compiler: gcc, Using built-in specs., COLLECT_GCC=gcc, COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper, OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa, OFFLOAD_TARGET_DEFAULT=1, Target: x86_64-linux-gnu, Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04.1' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2, Thread model: posix, Supported LTO compression algorithms: zlib zstd, gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)
  [pari_galdata-20080411.p0]   No stamp file for package 'pari_galdata' in /sage/local/var/lib/sage/installed
  [pari_galdata-20080411.p0]   No spkg-legacy-uninstall script; nothing to do
  [pari_galdata-20080411.p0]   ::group::.log
  [pari_galdata-20080411.p0]   [spkg-install] src/galdata -> /sage/local/var/tmp/sage/build/pari_galdata-20080411.p0/inst/sage/local/share/pari
  [pari_galdata-20080411.p0]   ::endgroup::
  [pari_galdata-20080411.p0]   Moving package files from temporary location /sage/local/var/tmp/sage/build/pari_galdata-20080411.p0/inst to /sage/local
  [pari_galdata-20080411.p0]   cp: cannot create directory '/sage/local/./share/pari': File exists
  [pari_galdata-20080411.p0]   ************************************************************************
  [pari_galdata-20080411.p0]   Error moving files for pari_galdata-20080411.p0.
  [pari_galdata-20080411.p0]   ************************************************************************
  [pari_galdata-20080411.p0]   Please email sage-devel (http://groups.google.com/group/sage-devel)
  [pari_galdata-20080411.p0]   explaining the problem and including the log files
  [pari_galdata-20080411.p0]     /sage/logs/pkgs/pari_galdata-20080411.p0.log
  [pari_galdata-20080411.p0]   and
  [pari_galdata-20080411.p0]     /sage/config.log
  [pari_galdata-20080411.p0]   Describe your computer, operating system, etc.
  [pari_galdata-20080411.p0]   ************************************************************************
make[2]: *** [Makefile:3308: pari_galdata-SAGE_LOCAL-no-deps] Error 1
make[1]: *** [Makefile:3308: /sage/local/var/lib/sage/installed/pari_galdata-20080411.p0] Error 2
make --no-print-directory lrcalc-SAGE_LOCAL-no-deps
  [pari_seadata_small-20090618.p0] successfully installed.

Copy link
Copy Markdown
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this a separate PR?

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 23, 2026

can you make this a separate PR?

Yes. I will push force. Please help me relabel this positive

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 23, 2026

link to #41875

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 24, 2026

@dimpase This also should be relabelled as positive

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 25, 2026

@dimpase @tobiasdiez the primecount package in Ubuntu 26.04 is also problematic. The ubuntu maths team does not fix it until now. We may wait it apply 8.3 version? https://code.launchpad.net/ubuntu/+source/primecount

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 25, 2026

Or we just remove primecount debian directly? I do not know if someone can contact the ubuntu math team to fix this

@dimpase
Copy link
Copy Markdown
Member

dimpase commented Mar 25, 2026

Or we just remove primecount debian directly? I do not know if someone can contact the ubuntu math team to fix this

can we fix the CI to not use system primecount on Ubuntu?

@dimpase
Copy link
Copy Markdown
Member

dimpase commented Mar 25, 2026

@dimpase @tobiasdiez the primecount package in Ubuntu 26.04 is also problematic. The ubuntu maths team does not fix it until now. We may wait it apply 8.3 version? https://code.launchpad.net/ubuntu/+source/primecount

you should add to your report the primecount upstream acknowledgement that it is a bug, and a link to the fixed version.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 25, 2026

@dimpase @tobiasdiez the primecount package in Ubuntu 26.04 is also problematic. The ubuntu maths team does not fix it until now. We may wait it apply 8.3 version? https://code.launchpad.net/ubuntu/+source/primecount

you should add to your report the primecount upstream acknowledgement that it is a bug, and a link to the fixed version.

I have reported this to debian. but Ubuntu team does not release primecount 8.2, also use the problematic version. I think I will remove primecount from spkg/primecount/distro/debian

@dimpase
Copy link
Copy Markdown
Member

dimpase commented Mar 25, 2026

@dimpase @tobiasdiez the primecount package in Ubuntu 26.04 is also problematic. The ubuntu maths team does not fix it until now. We may wait it apply 8.3 version? https://code.launchpad.net/ubuntu/+source/primecount

you should add to your report the primecount upstream acknowledgement that it is a bug, and a link to the fixed version.

I have reported this to debian. but Ubuntu team does not release primecount 8.2, also use the problematic version. I think I will remove primecount from spkg/primecount/distro/debian

I am talking about
https://bugs.launchpad.net/ubuntu/+source/primecount/+bug/2141868

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 29, 2026

I am talking about https://bugs.launchpad.net/ubuntu/+source/primecount/+bug/2141868

Yes, we have to wait. The Ubuntu team deal with this so slow. or we can check the version from pc file

@vbraun vbraun merged commit c5f8fc7 into sagemath:develop Apr 8, 2026
30 of 35 checks passed
@cxzhong cxzhong deleted the Bump-Python branch April 9, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants